package session08.MyTest;

import javax.swing.*;
import java.awt.*;

public class Second extends JPanel {
    private JLabel imgLab;//图片标签
    public Second() {
        this.imgLab=new JLabel();
        this.imgLab.setSize(600,400);
        ImageIcon icon=new ImageIcon("C:/Users/RJ/Pictures/Saved Pictures/2345_image_file_copy_2.jpg");
        icon.setImage(icon.getImage().getScaledInstance(600,400,Image.SCALE_AREA_AVERAGING));
        this.imgLab.setIcon(icon);
        this.add(this.imgLab);
    }
}
